#include <stdio.h>
#include <unistd.h>
#include <string.h>
#define Max 101
#define LABLE '='
int main()
{
  char bar[Max];
  memset(bar,'\0',sizeof(bar));
  const char *lable="|/-\\";
  int i = 0;
  while(i<=100)
  {
    printf("[%-100s][%d%%][%c]\r",bar,i,lable[i%4]);
    fflush(stdout);
    bar[i++]=LABLE;
    usleep(10000);
  }
  printf("\n");
  return 0;
}
